package com.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

/**
 * 【经营项目】-水电费录入记录
 */

@Entity
@Table(name = "utility_bill_record")
@Getter @Setter
public class BusinessUtilityBillRecord extends BaseEntity {

    @Column
    private String projectName;

    @Column
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private Date billMonth;

    @Column(name = "utility_bill_id", nullable = false)
    private Integer utilityBillId;

    @Column(name = "water_fee_payment", precision = 15, scale = 2, columnDefinition = "DECIMAL(15,2) default 0")
    private BigDecimal waterFeePayment =  BigDecimal.ZERO;

    @Column(name = "electricity_fee_payment", precision = 15, scale = 2, columnDefinition = "DECIMAL(15,2) default 0")
    private BigDecimal electricityFeePayment =  BigDecimal.ZERO;

    // 本次总水电费支付金额
    @Column(name = "total_fee_payment", precision = 15, scale = 2, columnDefinition = "DECIMAL(15,2) default 0")
    private BigDecimal totalFeePayment =  BigDecimal.ZERO;
}
